package string;

/**
 *  截取当前字符串中指定范围内的字符串(含头不含尾)
 */
public class SubstringDemo {
    public static void main(String[] args) {
        String str = "www.tedu.cn";
        String name = str.substring(str.indexOf(".")+1,str.lastIndexOf("."));
        System.out.println(name);
    }
}
